package com.jeff.tianti.cms.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Entity
@Table(name = "area")//地区表
public class Area implements Serializable {
    private static final long serialVersionUID = -7707817405641174796L;
    @Id
    @Column(name = "id")//ID
    private Integer id;
    @Column(name = "name")//地区名
    private String name;
    private Integer parentAreaId;
    @Column(name = "level")//级别
    private Byte level;
    @Column(name = "longitud",updatable = false, precision=10, scale=6)//经度
    private BigDecimal longitud;
    @Column(name = "latitude",updatable = false, precision=10, scale=6)//纬度
    private BigDecimal latitude;
    @Column(name = "create_date")//创建日期
    private Date createDate;
    @Column(name = "adcode")//区域编码
    private String adcode;
    @Column(name = "citycode")//城市编码
    private String citycode;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }
    @Column(name = "parent_area_id")//父地区ID
    public Integer getParentAreaId() {
        return parentAreaId;
    }

    public void setParentAreaId(Integer parentAreaId) {
        this.parentAreaId = parentAreaId;
    }

    public Byte getLevel() {
        return level;
    }

    public void setLevel(Byte level) {
        this.level = level;
    }

    public BigDecimal getLongitud() {
        return longitud;
    }

    public void setLongitud(BigDecimal longitud) {
        this.longitud = longitud;
    }

    public BigDecimal getLatitude() {
        return latitude;
    }

    public void setLatitude(BigDecimal latitude) {
        this.latitude = latitude;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getAdcode() {
        return adcode;
    }

    public void setAdcode(String adcode) {
        this.adcode = adcode == null ? null : adcode.trim();
    }

    public String getCitycode() {
        return citycode;
    }

    public void setCitycode(String citycode) {
        this.citycode = citycode == null ? null : citycode.trim();
    }
}